﻿using System.Data;
using System.Collections.Generic;
public partial class Globals
{
    //public const string assemblyTitle = "QLPK";
    //public const string assemblyDescription = "He thong quan ly quan ly phong kham";
    public const string assemblyTitle = "SOFT";
    public const string assemblyDescription = "...";
    public const string assemblyVersion = "1.0.0.01";
    public static int assemblyVersionInt = ToInt32(assemblyVersion.Replace(".", ""));
    public static string assemblyVersionDate = @"11/09/2014";


    public const string CS_DISPLAY_DATE_FORMAT = "dd/MM/yyyy";//"dd-MMM-yyyy";
    public const string CS_DISPLAY_TIME_FORMAT = "HH:mm";
    public const string CS_DISPLAY_DATETIME_FORMAT = "dd-MMM-yyyy HH:mm";
    public const string CS_DISPLAY_TIMEDATE_FORMAT = "HH:mm dd-MMM-yyyy";
    public const string CS_DISPLAY_NUMBER_FORMAT = "#,##0";
    public const string CS_EDIT_DATE_FORMAT = "dd/MM/yyyy";
    public const string CS_EDIT_DATETIME_FORMAT = "dd/MM/yyyy HH:mm";
    public const string CS_EDIT_TIME_FORMAT = "HH:mm";
    public const string CS_DECIMAL_SYMBOL = ".";
    public const string CS_DIGIT_GROUP_SYMBOL = ",";
    public const byte CS_DECIMAL_SCALE = 2;
    public const string CS_DATETIME_SYMBOL = "/";

    internal static readonly string[] cs_Type_DateTime = { "DATETIME", "DATE" };
    internal static readonly string[] cs_Type_Short = { "SHORT", "INT16", "SMALLINT" };
    internal static readonly string[] cs_Type_Integer = { "INTEGER", "INT32", "INT" };
    internal static readonly string[] cs_Type_Long = { "LONG", "INT64", "BIGINT" };
    internal static readonly string[] cs_Type_Byte = { "BYTE", "TINYINT" };
    internal static readonly string[] cs_Type_Double = { "DOUBLE", "FLOAT" };
    internal static readonly string[] cs_Type_Single = { "SINGLE" };
    internal static readonly string[] cs_Type_Decimal = { "DECIMAL", "NUMERIC", "MONEY", "NUMBER" };
    internal static readonly string[] cs_Type_Boolean = { "BOOLEAN", "BIT" };
    internal static readonly string[] cs_Type_String = { "STRING", "TEXT", "NTEXT" };

    //Private cache mapping table column index with object property
    private static Dictionary<string, List<int>> m_cacheTableColumn = new Dictionary<string, List<int>>();

    private static byte[] IV = { 0xab, 0xcd, 0xef, 0x12, 0x34, 0x56, 0x78, 0x90, 0x13, 0x24, 0x57, 0x68, 0x9a, 0xbd, 0xce, 0xdf };

    public struct LookupStructure
    {
        public object LookupValue;
        public string LookupCode;
        public string LookupName;
        public DataRow LookupData;
    }

    public enum LookupMode : int
    {
        SelectData = 0,
        CheckData = 1,
        GetData = 2,
        CacheData = 4
    }

    public enum DataInputState
    {
        BrowseMode = 0,
        ViewMode = 1,
        EditMode = 2,
        AddMode = 4,
        CopyMode = 8,
        VersionMode = 16,
        ReviewMode = 32,
        ApproveMode = 64
    }

    public enum DataInputType
    {
        TextData = 0,
        NumberData = 1,
        IntegerData = 2,
        DateData = 3,
        TimeData = 4,
        EmailData = 5,
        WebData = 6,
        RegExData = 7,
        TimeExData = 8
    }
}

